package ar.edu.uba.fi.jmit.aspecter.parser.parsers;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import ar.edu.uba.fi.jmit.aspecter.parser.configurations.ConfigurationParse;
import ar.edu.uba.fi.jmit.aspecter.parser.configurations.Params;

public class Configurations {

	private Map<String, ConfigurationParse> configurations = new HashMap<String, ConfigurationParse>();
	
	public void addConfiguration(String key, ConfigurationParse value){
		this.configurations.put(key,value);
	}
	
	public ConfigurationParse getConfiguration(String key){
		return this.configurations.get(key);
	}
	
	public void addParamToConfiguration(String key,String name, String type){
		((Params)this.getConfiguration(key)).addParam(name, type);
	}
		
	public Iterator<ConfigurationParse> getIterator(){
		return this.configurations.values().iterator();
	}
	
}
